import copy

class Solution(object):
    def rotate(self, nums, k):
        """
        :type nums: List[int]
        :type k: int
        :rtype: void Do not return anything, modify nums in-place instead.
        """
        tmp = copy.copy(nums)
        for i in range(len(nums)):
            nums[i] = tmp[(i-k)%len(nums)]

print(Solution().rotate([1,2,3,4,5,6,7], 3))
